Skip to content

Conversation

@petrinecp
Copy link
Contributor

Fix ConfigurationValidator to properly check if CommerceConfiguration exists and add tests

…ceConfiguration (#579)

* Initial plan

* Fix ConfigurationValidator to properly check if CommerceConfiguration exists and add tests

Co-authored-by: petrinecp <5637849+petrinecp@users.noreply.github.com>

* Fix code formatting to pass dotnet format verification

Co-authored-by: petrinecp <5637849+petrinecp@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: petrinecp <5637849+petrinecp@users.noreply.github.com>
@petrinecp petrinecp requested a review from a team as a code owner January 22, 2026 09:44
Copilot AI review requested due to automatic review settings January 22, 2026 09:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug in ConfigurationValidator where it incorrectly validated CommerceConfiguration even when it doesn't exist in the configuration, and adds comprehensive test coverage.

Changes:

  • Fixed ConfigurationValidator to use .Exists() instead of null check for CommerceConfiguration section
  • Added three unit tests covering various CommerceConfiguration scenarios
  • Added CLI project reference to test project to enable testing

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
Migration.Tool.CLI/ConfigurationValidator.cs Fixed bug by changing from null check to .Exists() check for CommerceConfiguration validation
Migration.Tool.Tests/ConfigurationValidatorTests.cs Added comprehensive unit tests for CommerceConfiguration validation scenarios
Migration.Tool.Tests/Migration.Tool.Tests.csproj Added project reference to CLI project to enable access to ConfigurationValidator

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@petrinecp petrinecp merged commit 91f0468 into master Jan 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants